<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />
    <title>Result</title>
    <link rel="stylesheet" href="../static/assets/bootstrap/css/bootstrap3.3.7.min.css" />
    <script src="../static/assets/jquery2.1.1/jquery.min.js"></script>
    <script src="../static/assets/bootstrap/js/bootstrap3.3.7.min.js"></script>
    <link rel="stylesheet" href="../static/assets/bootstrap/css/bootstrap.min.css" />
    <link rel="stylesheet" href="../static/assets/css/idontkonwwhatisit.css" />
    <link rel="stylesheet" href="../static/assets/fonts/font-awesome.min.css" />
    <link rel="stylesheet" href="../static/assets/fonts/simple-line-icons.min.css" />
    <link rel="stylesheet" href="../static/assets/css/animate.min.css" />
    <script src="../static/assets/bootstrap/js/bootstrap.min.js"></script>
    <script src="../static/assets/js/bs-init.js"></script>
  </head>

  <body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-light navbar-expand bg-light navigation-clean">
      <div class="container">
        <p style="font-size: 38px;padding-top: 10px">Brand</p>
        <div class="collapse navbar-collapse" id="navcol-1" style="margin-left: 100px;font-size: 19px">
          <a href="home" style="padding-top: 6px;padding-right: 12px;padding-bottom: 6px;margin-left: 450px;padding-left: 0px;color: inherit;text-decoration: none">首页</a>
          <a href="lawCase" style="margin-left: 100px;color: inherit;text-decoration: none">指导案例</a>
          <a href="userpage" style="margin-left: 100px;color: inherit;text-decoration: none">个人中心</a>
          <a href="userpage" style="margin-left: 100px;color: inherit;text-decoration: none">{{ uname }}</a>
        </div>
      </div>
    </nav>

    <!-- 搜索行 -->
    <form action="getLaw">
      <div class="row clearfix">
        <div class="col-md-1 column"></div>
        <div class="col-md-4 column">
          <div class="input-group">
            <input class="form-control" type="search" placeholder="请输入内容" aria-label="Search" name="searchLawContent" />
          </div>
        </div>

        <div class="col-md-3 column">
          <select id="下拉菜单" name="下拉菜单" style="height: 30px">
            <option value="titleSearch">题目搜索</option>
            <option value="statueSearch">状态搜素</option>
            <option value="timeSearch">时间搜素</option>
          </select>
          <button type="submit" style="height: 30px">搜索</button>
        </div>
        <div class="col-md-4 column"></div>k8
      </div>
    </form>

    <!-- 结果部分 -->
    <div class="row clearfix">
      <div class="col-md-1 column"></div>
      <div class="col-md-7 column">
        <table class="table table-hover">
          <thead style="font-size: large;">
            <tr>
              <th>题目</th>
              <th>状态</th>
              <th>发布时间</th>
              <th>施行时间</th>
            </tr>
          </thead>
          <tbody style="font-size: large;">
            {% for i in laws %}
              <tr>
                <td>
                  <a href="getLawContent?id={{ i[4] }}">{{ i[0] }}</a>
                </td>
                <td>{{ i[1] }}</td>
                <td>{{ i[2] }}</td>
                <td>{{ i[3] }}</td>
              </tr>
            {% endfor %}
          </tbody>
        </table>
      </div>
      <div class="col-md-4 column" style="font-size: large;">
        <h3 style="margin-left: 10px;">推荐内容</h3>
        <ul>
          {% for i in recommends %}
            <li>
              <a href="getLawCaseContent?id={{ i[1] }}">{{ i[0] }}</a>
            </li>
          {% endfor %}
        </ul>
      </div>
    </div>

    <!-- 页脚 -->
    <footer class="bg-light footer" id="foot">
      <div class="container">
        <div class="row">
          <div class="col-lg-6 text-center text-lg-start my-auto h-100">
            <ul class="list-inline mb-2">
              <li class="list-inline-item">
                <a href="#">关于我们</a>
              </li>
              <li class="list-inline-item">
                <span>⋅</span>
              </li>
              <li class="list-inline-item">
                <a href="#">联系我们</a>
              </li>
              <li class="list-inline-item">
                <span>⋅</span>
              </li>
              <li class="list-inline-item">
                <a href="#">使用说明</a>
              </li>
              <li class="list-inline-item">
                <span>⋅</span>
              </li>
              <li class="list-inline-item">
                <a href="#">隐私政策</a>
              </li>
            </ul>
            <p class="text-muted small mb-4 mb-lg-0">© Brand 2023. All Rights Reserved.</p>
          </div>
          <div class="col-lg-6 text-center text-lg-end my-auto h-100">
            <ul class="list-inline mb-0">
              <li class="list-inline-item">
                <a href="#"><i class="fa fa-facebook fa-2x fa-fw"></i></a>
              </li>
              <li class="list-inline-item">
                <a href="#"><i class="fa fa-twitter fa-2x fa-fw"></i></a>
              </li>
              <li class="list-inline-item">
                <a href="#"><i class="fa fa-instagram fa-2x fa-fw"></i></a>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </footer>
  </body>

  <script>
    function sendData() {
      const selectBox = document.getElementById('下拉菜单')
      const selectedValue = selectBox.options[selectBox.selectedIndex].value
    
      let url = ''
      if (selectedValue === 'contentSearch') {
        url = '/content_search'
      } else if (selectedValue === 'timeSearch') {
        url = '/time_search'
      } else if (selectedValue === 'titleSearch') {
        url = '/title_search'
      }
    }
  </script>
</html>
